package com.jt.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class ImageVO implements Serializable {
    private static final long serialVersionUID = -4226821175888506806L;
//    编辑器参数
//    kingEditorParams : {
//        filePostName  : "uploadFile",
//        uploadJson    : '/pic/upload',
//        dir           : "image"
//    }
    private Integer error;      //0正常   1错误
    private String url;         //图片的虚拟路径
    private Integer width;      //宽
    private Integer height;     //高

    public static ImageVO fail(){

        return new ImageVO(1,null,null,null);
    }

    public static ImageVO success(String url,Integer width,Integer height){

        return new ImageVO(0,url,width,height);
    }


}













